package com.kkw.shoppingmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kkw.common.utils.PageUtils;
import com.kkw.shoppingmall.product.entity.CategoryEntity;
import com.kkw.shoppingmall.product.vo.Catalog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author Kevin
 * @email sunlightcs@gmail.com
 * @date 2021-05-09 22:40:58
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> asList);

    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    /**
     * 不加入缓存查三级分类
     * @return
     */
    Map<String, List<Catalog2Vo>> getCatalogJson();

    /**
     * 加入缓存查三级分类
     * @return
     */
    Map<String, List<Catalog2Vo>> getCatalogJsonRedis();
}

